package com.citycloud.edu.util;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * @author 陶肖寅
 * @version V1.0
 * <p>
 * date: 2020/10/31 10:16 下午
 * email:fromlx@126.com
 * @Copyright: 2020-2021 城云科技(中国)有限公司
 * </p>
 */
public class DBHelper {
    public static final String url = "jdbc:mysql://rm-bp10j5t3w51isj8y5qo.mysql.rds.aliyuncs.com:3306/lagou_db?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai";
    public static final String name = "com.mysql.cj.jdbc.Driver";
    public static final String user = "taoxiaoyin";
    public static final String password = "Taoxiaoyin520";
    private  static Connection connection = null;

    public  static   Connection  getConn(){
        try {
            Class.forName(name);
            connection = DriverManager.getConnection(url,user,password);
        }catch (Exception e){
            e.printStackTrace();
        }
        return  connection;
    }
}
